This is a live demo of the wrapping method SpriteWorld uses for its scrolling. It lets you go behind the scenes and see what happens in the offscreen area during a scrolling animation. As with many of the demos, you can move around using either the arrow keys or the numeric keypad. At any time you can press Esc to return to the beginning of the maze, and the mouse button quits the program.
In the top of the window, what you would normally see on the screen is displayed, and in the bottom, the offscreen "work area" of the SpriteWorld is shown. In addition, color-coded rectangles show which "pieces" are copied from the offscreen area to the screen area. Of course, you wouldn't see these rectangles in a normal animation; they are provided here only to demonstrate how the scrolling routines work. You can change the rectangles' thickness by hitting the 0-5 number keys. (Not the ones on the keypad.)
Note that this is not a good demonstration of the speed of the scrolling routines, since this program not only copies two different portions to the screen each frame, but also copies the entire background to the work area to erase the color-coded rectangles from the previous frame, which slows things down considerably.
The other sprites bouncing around the screen have been added to demonstrate what happens "behind the scenes" when a sprite moves into the visible rectangle which the user sees on the screen. You'll notice that only the portion of the sprite that is visible in the top portion of the window is drawn offscreen, since the sprite is clipped to the visScrollRect. Also, several idle sprites have been added at the beginning of the maze. This is so you can see how idle sprites are handled as they enter and exit the visScrollRect.